"""
Title: 阶乘的实现
Description:
递归解法
非递归解法
"""


def factorial(n):
    """
    求n阶乘
    :param n:
    :return:
    """
    if n == 1:
        return 1
    return n * factorial(n - 1)


if __name__ == "__main__":
    print(factorial(3))
    print(factorial(4))
    print(factorial(5))
    print(factorial(6))
    print(factorial(200))
